<template>
  <div class="app-container">
    <el-form ref="form" :model="form" label-width="120px" action="/pic/upload" enctype="multipart/form-data" method="post">
      <el-form-item label="Activity name">
        <el-input v-model="form.username" /><br>
        <input type="file" name="pic">
      </el-form-item>
      <el-form-item>
        <el-button type="submit" @click="onSubmit">Create</el-button>
        <el-button @click="onCancel">Cancel</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
export default {
  data() {
    return {
      form: {
        name: '',
        region: '',
        date1: '',
        date2: '',
        delivery: false,
        type: [],
        resource: '',
        desc: ''
      }
    }
  },
  methods: {
    onSubmit() {
      this.$message('submit!')
    },
    onCancel() {
      this.$message({
        message: 'cancel!',
        type: 'warning'
      })
    }
  }
}
</script>

<style scoped>
.line{
  text-align: center;
}
</style>

